package com.boliq.lol.ui.news;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.boliq.lol.R;
import com.boliq.lol.adapter.NewsArticleAdapter;
import com.boliq.lol.base.BaseFragment;
import com.boliq.lol.bean.NewsArticleBean;

/**
 * <pre>
 * ================================================
 * 作者: BLQ_SSNB
 * 日期：2021/2/20
 * 邮箱: blq_ssnb@outlook.com
 * 修改次数: 1
 * 描述:
 *      添加描述
 * ================================================
 * </pre>
 */
public class NewsArticleFragment extends BaseFragment {

    private RecyclerView mRecyclerView;
    private NewsArticleAdapter mAdapter;

    @Override
    protected int rootLayout() {
        return R.layout.fragment_news_article;
    }

    @Override
    protected void initView(View view) {
        mRecyclerView = view.findViewById(R.id.rv_content_list);
    }

    @Override
    protected void initData() {
        mAdapter = new NewsArticleAdapter();
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());
        mAdapter.addData(new NewsArticleBean());

    }

    @Override
    protected void bindData() {
        super.bindData();
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        mRecyclerView.setAdapter(mAdapter);

    }

    @Override
    protected void bindEvent() {

    }
}
